<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>学习</title>
    <style>
        .myp{
            background-color: red;
        }
    </style>
</head>
<body>
    <div >
        <p id="p1" class="myp" >
            你好
        </p>
        <p>
            aaaa
        </p>
          <p class="myp">
            bbbbb
        </p>
    </div>
    
</body>
<script>

 var r =   document.getElementById("p1")   
//  console.log(r);
//  r = document.getElementsByTagName("p")
//    console.log(r);
//  r =  document.getElementsByClassName("myp")
//   console.log(r);
 r =  document.title
 document.title = "我的学习"
 console.log(r);
 
</script>
</html>